package com.joker.aigc.chat.service;

import com.joker.aigc.chat.domain.entity.GroupMember;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
* @author 20346
* @description 针对表【group_member(群成员表)】的数据库操作Service
* @createDate 2023-12-17 11:26:08
*/
public interface GroupMemberService extends IService<GroupMember> {




    List<Long> getMemberUidList(Long groupId);

    List<Long> getMemberBatch(Long groupId, List<Long> uidList);

    Map<Long, Integer> getMemberMapRole(Long groupId, List<Long> uidList);

    GroupMember getMember(Long groupId, Long uid);

    List<GroupMember> getSelfGroup(Long uid);

    List<Long> getRoomGroupIdSelfGroup(Long uid);

    List<GroupMember> getListSelfGroup(Long uid);

    Boolean isGroupShip(Long roomId, List<Long> uidList);


    Boolean isLord(Long id, Long uid);

    Boolean isManager(Long id, Long uid);

    List<Long> getManageUidList(Long id);

    void addAdmin(Long id, List<Long> uidList);

    void revokeAdmin(Long id, List<Long> uidList);

    Boolean removeByGroupId(Long groupId, List<Long> uidList);

    List<GroupMember> buildAndSaveGroupMemberBatch(List<Long> uidList, Long roomGroupId);


}
